<?php $style_th = 'style="background-color:#CCCCCC"' ;?>
<?php $style_td = 'style="border:solid 1px #000"' ;?>
<?php $style_is_code = 'style="color:#FF0000"' ;?>
<?php $style_h2= 'style="width:100%;text-align:center;font-weight:bold;font-size:24px"';?>
<?php $style_description= ' style="width:100%;text-align:center;font-style:italic" ';?>

<div <?php echo $style_h2 ?>>BÁO CÁO TỔNG HỢP NHẬP XUẤT TỒN</div>
<div <?php echo $style_description ?>>Từ ngày: <?php echo $this->from_time?>. Đến ngày: <?php echo $this->to_time?></div>
<br/>
<table cellpadding="4" cellspacing="0" border='1' style="width:100%; border-collapse:collapse">
	<thead>
		<tr>
			<th <?php echo $style_th ?> rowspan='2'>STT</th>
			<th <?php echo $style_th ?> rowspan='2'>Mã thành phẩm</th>
			<th <?php echo $style_th ?> rowspan='2'>Tên thành phẩm</th>
			<th <?php echo $style_th ?> rowspan='2'>Đơn vị tính</th>
			<th <?php echo $style_th ?> rowspan='2'>Tồn đầu kỳ<br/><(A)</th>
			<th <?php echo $style_th ?> rowspan='2'>Nhập trong kỳ<br/>(A)->(B)</th>
			<th <?php echo $style_th ?> rowspan='2'>Xuất trong kỳ<br/>(A)->(B)</th>
			<th <?php echo $style_th ?> rowspan='2'>Tồn cuối kỳ<br/>>(B)</th>
			<th <?php echo $style_th ?> colspan='3'>Kiểm kê</th>
		</tr>
		<tr>
			<th <?php echo $style_th ?>>Thực tế</th>
			<th <?php echo $style_th ?>>Thừa</th>
			<th <?php echo $style_th ?>>Thiếu</th>
		</tr>
	</thead>
	<tbody>
		<?php if($this->paginator){$no=1;foreach ($this->paginator as $product){?>
		<tr>
			<td align="center"><?php echo $no++ ;?></td>
			<td><?php echo $product->product_code?></td>
			<td><?php echo $product->product_name?></td>
			<td><?php echo $product->m_Array['inbound_detail_product_unit_code']?></td>
			<td align="right"><?php echo $product->m_Array['ton_dau_ki'] ;?></td>
			<td align="right"><?php echo $product->m_Array['nhap_trong_ki'] ;?></td>
			<td align="right"><?php echo $product->m_Array['xuat_trong_ki'] ;?></td>
			<td align="right"><?php echo $product->m_Array['ton_cuoi_ki'] ;?></td>
			<td></td>
			<td></td>
			<td></td>
		</tr>
		<?php }}?>
	</tbody>
</table>
